#!/bin/bash

FLAGS="-std=c++11 -O2"

#g++-4.7 benchmark.cpp $FLAGS -lboost_signals -o ~/benchmark/benchmark.out `pkg-config --cflags --libs sigc++-2.0`

g++-4.7 benchmark.cpp lib/jl_signal/ObjectPool.cpp lib/jl_signal/SignalBase.cpp $FLAGS -lboost_signals -o ~/benchmark/benchmark.out `pkg-config --cflags --libs sigc++-2.0`

echo "timing bs1_benchmark compile"
time g++-4.7 bs1_benchmark.cpp $FLAGS -lboost_signals -o ~/benchmark/bs1_benchmark.out

echo "timing bs2_benchmark compile"
time g++-4.7 bs2_benchmark.cpp $FLAGS -o ~/benchmark/bs2_benchmark.out

echo "timing bs2_benchmark compile"
time g++-4.7 bs2_benchmark.cpp $FLAGS -o ~/benchmark/bs2_benchmark.out

echo "timing evl_benchmark compile"
time g++-4.7 evl_benchmark.cpp $FLAGS -o ~/benchmark/evl_benchmark.out

echo "timing jls_benchmark compile"
time g++-4.7 jls_benchmark.cpp lib/jl_signal/ObjectPool.cpp lib/jl_signal/SignalBase.cpp $FLAGS -o ~/benchmark/jls_benchmark.out

echo "timing nss_benchmark compile"
time g++-4.7 nss_benchmark.cpp $FLAGS -o ~/benchmark/nss_benchmark.out

echo "timing sgc_benchmark compile"
time g++-4.7 sgc_benchmark.cpp $FLAGS -o ~/benchmark/sgc_benchmark.out `pkg-config --cflags --libs sigc++-2.0`
